#include <stdio.h>
#include <unistd.h>
#include <string.h>

#define NUM 102

int main()
{
    char bar[NUM];
    memset(bar,0,sizeof(bar));
    const char* str = "|/-\\";

    int cnt = 0;
    while(cnt<101)
    {
        printf("[%-100s][%d%%] %c\r",bar,cnt,str[cnt%4]);
        bar[cnt++] = '*';
        fflush(stdout);
        usleep(60000);
    }

    printf("\n");
    return 0;

    //printf("you can see me!\n");
    //fflush(stdout);
    //sleep(1);
}
